package com.oa.modules.approvalsec1.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oa.common.utils.AppUtils;
import com.oa.common.utils.PageUtils;
import com.oa.common.utils.Query;
import com.oa.modules.approvalsec1.dao.LicenceDao;
import com.oa.modules.approvalsec1.entity.LicenceEntity;
import com.oa.modules.approvalsec1.entity.LicenceRecordEntity;
import com.oa.modules.approvalsec1.entity.TeacherQualificationEntity;
import com.oa.modules.approvalsec1.service.LicenceService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

@Service("licenceService")
public class LicenceServiceImpl extends ServiceImpl<LicenceDao, LicenceEntity> implements LicenceService {


    @Override
    public List<LicenceEntity> getFirst() {
        return baseMapper.getFirst();
    }

    @Override
    public List<LicenceEntity> getChildrenById(Integer id) {
        return baseMapper.getChildrenById(id);
    }

    @Override
    public List<LicenceEntity> getTextByIds(Integer[] ids) {
        return baseMapper.getTextByIds(ids);
    }

    @Override
    public List<LicenceEntity> getTree() {
        return baseMapper.getTree();
    }

    @Override
    public List<LicenceEntity> getChildrenByName(String name) {
        return baseMapper.getChildrenByName(name);
    }

    @Override
    public List<LicenceEntity> getChildrenByName2(String name) {
        return baseMapper.getChildrenByName2(name);
    }

    @Override
    public void submit(Map<String,Object> map) {
        baseMapper.submit(map);
    }

    @Override
    public List<Map> getCategoryTotal() {
        return baseMapper.getCategoryTotal();
    }

    @Override
    public List<Map> getDateTotal() {
        return baseMapper.getDateTotal();
    }

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage page = AppUtils.getPage(new Query<LicenceRecordEntity>(),params);
        return AppUtils.setPage(page, baseMapper.findPage(params), baseMapper.findRecords(page, params));
    }

    @Override
    public List<String> selectFile(String[] idarray) {
        return baseMapper.selectFile(idarray);
    }
}
